package pl.edu.agh.logview.model;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;


@DatabaseTable(tableName = "agent")
public class Agent extends AbstractVertex {

	@DatabaseField(id = true)
	String agent;
	
	@DatabaseField
	int x;
	
	@DatabaseField
	int y;
	
	public int getX() {
		return x; 
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public Agent() {
		setVertexType(VertexType.VERTEX_AGENT);
	}

	public String getName() {
		return agent;
	}

	public void setName(String name) {
		this.agent = name;
	}
	public int getCenterX() {
		return (int) (x+ (getVertexType().getWidth() / 2) );
	}
	
}
